
* === Robustness: Table with varying levels of fixed effects ===================

* Note: the do-file "base_regressions" will need to be run first

foreach var in bev nrbev ice cars  { // nrbev ice cars 
	eststo clear
	forvalues i = 1/5 {
		estimates use "${ster}TableD4_col`i'_`var'"
		eststo
	}	


	esttab * ///
		using "${tables}tabD4_`var'_est.tex", ///
		keep(bergen_commuters_post)  ///
		coeflabels( ///
		bergen_commuters_post "Post $\times$ Paying commuters $\times$ Bergen" ///
		) ///
		fragment nodepvars nonumbers nogaps nolines nonotes noobs ///label   nogap booktabs ///
		nomtitle /// 
		prehead("") posthead("") ///
		stats() ///
		se  ///
		star(* 0.10 ** 0.05 *** 0.01)  ///
		replace	substitute(\_ _)

	esttab * ///
		using "${tables}tabD4_`var'_sumstat.tex", ///
		drop(*)  ///
		fragment nodepvars nonumbers nogaps nolines nonotes noobs ///label   nogap booktabs ///
		nomtitle  /// 
		prehead("") posthead("") ///
		stats(N  MeanValue1 MeanValue2, ///
		label("Observations"  "Mean depvar 2014 (paying commuters, Bergen)" "Mean depvar 2017 (paying commuters, Bergen)" ///
		) fmt(0 4 4) ) ///
		se  ///
		star(* 0.10 ** 0.05 *** 0.01)  ///
		replace	substitute(\_ _)
	}